package cn.web.web_module.rabbitmq.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: 张松
 * @Description:
 * @Date: Created in 9:51 2021/4/1
 * @Modified By:
 */
@Configuration
public class DirectEarningInfoConfiguration {


    @Bean
    public DirectExchange directEarningInfoExchange(){
        return new DirectExchange("direct_EarningInfo_exchange");
    }


    @Bean
    public Queue directEarningInfoQueue(){
        return new Queue("direct_EarningInfo_Queue");
    }



    @Bean
    public Binding directEarningInfoBinding(){
        return BindingBuilder.bind(directEarningInfoQueue()).to(directEarningInfoExchange()).with("earningInfo");
    }


}
